package test;

public class Demo6 {
    public static void main(String[] args) {
        Thread thread = new Thread(new Runnable() {
            @Override
            public void run() {
                while (true) {
                    System.out.println("Hello Thread");
                }
            }
        }, "Thread1");
        thread.start();
        while (true) {
            System.out.println("Hello main");
        }
    }
}
